'\" te
.\" Copyright (c) 2017 Peter Tribble.
.\" Copyright (c) 2003, Sun Microsystems, Inc. All Rights Reserved
.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License").  You may not use this file except in compliance with the License. You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing.
.\"  See the License for the specific language governing permissions and limitations under the License. When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE.  If applicable, add the following below this CDDL HEADER, with
.\" the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
.TH PKGADM 8 "Mar 2, 2017"
.SH NAME
pkgadm \- manage packaging system
.SH SYNOPSIS
.LP
.nf
\fBpkgadm dbstatus\fR [\fB-R\fR \fIrootpath\fR]
.fi

.LP
.nf
\fBpkgadm sync\fR [\fB-R\fR \fIrootpath\fR] [\fB-q\fR]
.fi

.LP
.nf
\fBpkgadm\fR \fB-V\fR
.fi

.LP
.nf
\fBpkgadm\fR \fB-?\fR
.fi

.SH DESCRIPTION
.LP
The \fBpkgadm\fR utility is used for managing the packaging
system. It has several subcommands that perform various operations relating to
packaging.
.sp
.ne 2
.na
\fB\fBsync\fR\fR
.ad
.sp .6
.RS 4n
Writes the contents file and rolls the contents log file. With use of the
\fB-q\fR option, forces the contents file server to quit.
.RE

.SS "Internal Install Database"
.LP
The Solaris operating system relies upon enhanced System V revision 4 (SVr4)
packages as the basis for its software installation and revision management.
The package maintenance software stores information about installed packages in
an internal database. The \fBpkgadm\fR subcommand \fBdbstatus\fR is used to
determine how the package internal database is implemented. The \fBdbstatus\fR
command returns a string that indicates the type of internal database in use.
In the current implementation, the \fBdbstatus\fR command always returns the
string \fBtext\fR, which indicates that the \fBcontents\fR(5) package database
is in use. Future releases of Solaris might supply alternative database
implementations.
.SH OPTIONS
.LP
The following options are supported:
.sp
.ne 2
.na
\fB\fB-q\fR\fR
.ad
.sp .6
.RS 4n
(Applies to \fBsync\fR subcommand.) Shuts down the contents file cache daemon.
.RE

.sp
.ne 2
.na
\fB\fB-R\fR \fIrootpath\fR\fR
.ad
.sp .6
.RS 4n
Defines the full name of a directory to use as the root (\fB/\fR) path.
.LP
Note -
.sp
.RS 2
The root file system of any non-global zones must not be referenced with the
\fB-R\fR option. Doing so might damage the global zone's file system, might
compromise the security of the global zone, and might damage the non-global
zone's file system. See \fBzones\fR(7).
.RE
.RE

.sp
.ne 2
.na
\fB\fB-V\fR\fR
.ad
.sp .6
.RS 4n
Print version associated with packaging tools.
.RE

.sp
.ne 2
.na
\fB\fB-?\fR\fR
.ad
.sp .6
.RS 4n
Print help message.
.RE

.SH EXAMPLES
.LP
\fBExample 1 \fRSynchronizing the contents file
.sp
.LP
The following example forces any pending changes to the contents(5) file to be flushed and the pkgserv daemon to shut down.

.sp
.in +2
.nf
example% pkgadm sync -q
.fi
.in -2
.sp

.SH EXIT STATUS
.ne 2
.na
\fB\fB0\fR\fR
.ad
.sp .6
.RS 4n
successful completion
.RE

.sp
.ne 2
.na
\fB\fBnon-zero\fR\fR
.ad
.sp .6
.RS 4n
fatal error
.RE

.SH ATTRIBUTES
.LP
See \fBattributes\fR(7) for descriptions of the following attributes:
.sp

.sp
.TS
box;
c | c
l | l .
ATTRIBUTE TYPE	ATTRIBUTE VALUE
_
Interface Stability	Evolving
.TE

.SH SEE ALSO
.LP
.BR pkginfo (1),
.BR pkgmk (1),
.BR pkgparam (1),
.BR pkgproto (1),
.BR pkgtrans (1),
.BR svcs (1),
.BR admin (5),
.BR contents (5),
.BR exec_attr (5),
.BR pkginfo (5),
.BR attributes (7),
.BR rbac (7),
.BR smf (7),
.BR installf (8),
.BR pkgadd (8),
.BR pkgask (8),
.BR pkgrm (8),
.BR removef (8),
.BR svcadm (8)
.sp
.LP
\fI\fR
.SH NOTES
.LP
The service for \fBpkgadm\fR is managed by the service management facility,
\fBsmf\fR(7), under the service identifier:
.sp
.in +2
.nf
svc:/system/pkgserv
.fi
.in -2
.sp

.sp
.LP
Administrative actions on this service, such as enabling, disabling, or
requesting restart, can be performed using \fBsvcadm\fR(8). The service's
status can be queried using the \fBsvcs\fR(1) command.
